import { createApp } from 'vue'
import { createPinia } from 'pinia'

const app = createApp(App)

// 引入侧边栏和默认样式文件
import '@/styles/theme.scss'
import '@/styles/index.scss' 

// 引入element
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// 导入饿了么图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

// 引入图标svg
// 使用阿里图标库的svg图标
import 'virtual:svg-icons-register' // 必须要引入这个
import SvgIcon from '@/components/svgIcon/index.vue'// svg component
// 注册全局svg组件
app.component('svg-icon', SvgIcon)

import App from './App.vue'
import router from './router'


app.use(createPinia())
app.use(ElementPlus)
app.use(router)

app.mount('#app')
